package com.lxh.lxhcrm.model.pojos;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

/**
 * 维修检测过程表
 */
@Entity
@Table(name = "repair_dete", schema = "lxh_crm", catalog = "")
public class RepairDete {
    private int deteId;
    private Integer workordId;
    private String deteExplain;
    private Integer planDate;
    private Integer empId;
    private Date beginDate;
    private Date finishDate;

    @Id
    @Column(name = "dete_id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public int getDeteId() {
        return deteId;
    }

    public void setDeteId(int deteId) {
        this.deteId = deteId;
    }

    @Basic
    @Column(name = "workord_id", nullable = true)
    public Integer getWorkordId() {
        return workordId;
    }

    public void setWorkordId(Integer workordId) {
        this.workordId = workordId;
    }

    @Basic
    @Column(name = "dete_explain", nullable = true, length = 200)
    public String getDeteExplain() {
        return deteExplain;
    }

    public void setDeteExplain(String deteExplain) {
        this.deteExplain = deteExplain;
    }

    @Basic
    @Column(name = "plan_date", nullable = true)
    public Integer getPlanDate() {
        return planDate;
    }

    public void setPlanDate(Integer planDate) {
        this.planDate = planDate;
    }

    @Basic
    @Column(name = "emp_id", nullable = true)
    public Integer getEmpId() {
        return empId;
    }

    public void setEmpId(Integer empId) {
        this.empId = empId;
    }

    @Basic
    @Column(name = "begin_date", nullable = true)
    public Date getBeginDate() {
        return beginDate;
    }

    public void setBeginDate(Date beginDate) {
        this.beginDate = beginDate;
    }

    @Basic
    @Column(name = "finish_date", nullable = true)
    public Date getFinishDate() {
        return finishDate;
    }

    public void setFinishDate(Date finishDate) {
        this.finishDate = finishDate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        RepairDete that = (RepairDete) o;
        return deteId == that.deteId &&
                Objects.equals(workordId, that.workordId) &&
                Objects.equals(deteExplain, that.deteExplain) &&
                Objects.equals(planDate, that.planDate) &&
                Objects.equals(empId, that.empId) &&
                Objects.equals(beginDate, that.beginDate) &&
                Objects.equals(finishDate, that.finishDate);
    }

    @Override
    public int hashCode() {
        return Objects.hash(deteId, workordId, deteExplain, planDate, empId, beginDate, finishDate);
    }
}
